Other forms: kept in line; keeping in line; keeps in line
To keep in line is to maintain control over someone, the way a teacher contains the actions of his students as they walk to recess or a military commander restricts her battalion's movements.
Anyone who works monitoring or controlling the behavior of other people keeps them in line. Part of a traffic cop's job is to keep drivers in line, and nursery school teachers play with kids while also keeping them in line. Things like guidelines, laws, and restrictions are also put in place to keep people in line: "The pool rules are there to keep you kids in line, so you don't fall and hurt yourself or splash people with your cannonballs!"